package com.jason.lightreader.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jason.lightreader.entity.Article;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ArticleMapper extends BaseMapper<Article> {
    //根据用户id获取收藏的文章
    List<Article> getArticlesByUserId(Integer userId);

    //根据用户id找到用户收藏的某篇文章
    Article getCollectionArticleByUserId(Integer userId,Integer articleId);
}
